package com.wry.im.handler.v2;

import com.wry.im.entity.Result;
import com.wry.im.server.ChatNettyServer;
import io.netty.channel.ChannelHandlerContext;

/**
 * <h1>  <h1>
 *
 * @author wry
 * @since 2023/4/28 10:40
 */
public class JoinGroupHandler {

    public static void execute(ChannelHandlerContext channelHandlerContext){
        //将Channel添加到ChannelGroup
        ChatNettyServer.GROUP.add(channelHandlerContext.channel());
        channelHandlerContext.channel().writeAndFlush(Result.success("加入系统默认群聊成功~"));
    }
}
